#ifndef WIDGET_SETUP_H
#define WIDGET_SETUP_H



#include "gui.h"



/** @brief Gui class for loading maps and setting parameters for server
*
*   \image html widget_setup.jpeg
*/
class setup_widget: public QWidget
{

	Q_OBJECT

public:

	/** @brief Creates part of the gui
	*	@param parent Qt parent
	*	@param flags Qt flags
	*/
	setup_widget( QWidget* parent = 0, Qt::WindowFlags flags = 0 );


private:

	//! widget layout
	QVBoxLayout* layout;

	//! input field for server's port
	QLineEdit* port_i;
	//! input field for number of players
	QComboBox* number_i;
	//! input field for map filename
	QLineEdit* load_i;
	//! input field for object file filename
	QLineEdit* object_i;
	//! load map filename button
	QPushButton* load_filename_b;
	//! load saved objects filename button
	QPushButton* object_filename_b;
	//! load map button
	QPushButton* load_b;
	//! load saved objects button - can be pressed when map is loaded
	QPushButton* object_b;
	//! listen button - can be pressed when map is loaded
	QPushButton* listen_b;
	

private slots:

	//! @brief Qt slot that starts server listener and shows listener gui
	void start_listen();
	//! @brief Qt slot that loads map filename
	void load_filename_map();
	//! @brief Qt slot that loads saved objects filename
	void load_filename_objects();
	//! @brief Qt slot that loads map
	void load_map();
	//! @brief Qt slot that loads saved objects
	void load_objects();

};



#endif